<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>Trigger Reference</title>
<style type="text/css">

/*
M.U.G.E.N documentation stylesheet.


Modified from voidspace.css.

:Authors: Ian Bicking, Michael Foord
:Contact: fuzzyman@voidspace.org.uk
:Date: 2005/08/26 
:Version: 0.1.0
:Copyright: This stylesheet has been placed in the public domain.

Stylesheet for Docutils.
Based on ``blue_box.css`` by Ian Bicking
and ``html4css1.css`` revision 1.46.
*/

@import url(html4css1.css);

body {
  font-family: Helvetica, Arial, sans-serif;
}

em, i {
  font-family: Times New Roman, Times, serif;
}

a {
  color: #5577EE;
  text-decoration: none;
}

a.reference.internal {
  font-size: 80%;
}

a.toc-backref {
  color: black;
  text-decoration: none;
}

a.toc-backref:hover {
  background-color: inherit;
}

a:hover {
  background-color: #cccccc;
  text-decoration: none;
}

a img {
  border: none;
}

div.attention, div.caution, div.danger, div.error, div.hint,
div.important, div.note, div.tip, div.warning {
  background-color: #cccccc;
  padding: 3px;
  width: 80%;
}

div.admonition p.admonition-title, div.hint p.admonition-title,
div.important p.admonition-title, div.note p.admonition-title,
div.tip p.admonition-title  {
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

div.attention p.admonition-title, div.caution p.admonition-title,
div.danger p.admonition-title, div.error p.admonition-title,
div.warning p.admonition-title {
  color: #cc0000;
  font-family: sans-serif;
  text-align: center;
  background-color: #999999;
  display: block;
  margin: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-family: Verdana, Helvetica, Arial, sans-serif;
  border: thin solid black;
  /* This makes the borders rounded on Mozilla, which pleases me */
  -moz-border-radius: 8px;
  padding: 4px;
}

h1 {
  background-color: #445BAA;
  color: #ffffff;
  border: medium solid black;
}

h1 a.toc-backref, h2 a.toc-backref { 
  color: #ffffff;
}

h2 {
  background-color: #667788;
  color: #ffffff;
  border: thin solid black;
}

h3, h4, h5, h6 {
  background-color: #cccccc;
  color: #000000;
}

h3 a.toc-backref, h4 a.toc-backref, h5 a.toc-backref, 
h6 a.toc-backref { 
  color: #000000;
}

h1.title {
  text-align: center;
  background-color: #445BAA;
  color: #eeeeee;
  border: thick solid black;
  -moz-border-radius: 20px;
}

ol.loweralpha {
  list-style: lower-alpha }

ol.upperalpha {
  list-style: upper-alpha }

ol.lowerroman {
  list-style: lower-roman }

ol.upperroman {
  list-style: upper-roman }

table.footnote {
  padding-left: 0.5ex;
}

table.citation {
  padding-left: 0.5ex
}

pre.literal-block, pre.doctest-block {
  border: thin black solid;
  padding: 5px;
}

.image img { border-style : solid;
            border-width : 2px;
}

h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
  font-size: 100%;
}

code, tt {
  color: #000066;
  font-size: 120%;
}

</style>
</head>
<body>
<div class="document" id="trigger-reference">
<h1 class="title">Trigger Reference</h1>

<p>M.U.G.E.N, (c) Elecbyte 1999-2013</p>
<p>Documentation for version 1.1 (2013)</p>
<p>Updated 09 June 2013</p>
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference internal" href="#about-triggers" id="id1">About Triggers</a><ul>
<li><a class="reference internal" href="#abs-math" id="id2">Abs (math)</a></li>
<li><a class="reference internal" href="#acos-math" id="id3">Acos (math)</a></li>
<li><a class="reference internal" href="#ailevel" id="id4">AILevel</a></li>
<li><a class="reference internal" href="#alive" id="id5">Alive</a></li>
<li><a class="reference internal" href="#anim" id="id6">Anim</a></li>
<li><a class="reference internal" href="#animelem" id="id7">AnimElem(*,***)</a></li>
<li><a class="reference internal" href="#animelemno" id="id8">AnimElemNo</a></li>
<li><a class="reference internal" href="#animelemtime" id="id9">AnimElemTime</a></li>
<li><a class="reference internal" href="#animexist" id="id10">AnimExist</a></li>
<li><a class="reference internal" href="#animtime" id="id11">AnimTime</a></li>
<li><a class="reference internal" href="#asin-math" id="id12">Asin (math)</a></li>
<li><a class="reference internal" href="#atan-math" id="id13">Atan (math)</a></li>
<li><a class="reference internal" href="#authorname" id="id14">AuthorName(*,***)</a></li>
<li><a class="reference internal" href="#backedge" id="id15">BackEdge</a></li>
<li><a class="reference internal" href="#backedgebodydist" id="id16">BackEdgeBodyDist</a></li>
<li><a class="reference internal" href="#backedgedist" id="id17">BackEdgeDist</a></li>
<li><a class="reference internal" href="#bottomedge" id="id18">BottomEdge</a></li>
<li><a class="reference internal" href="#camerapos" id="id19">CameraPos</a></li>
<li><a class="reference internal" href="#camerazoom" id="id20">CameraZoom</a></li>
<li><a class="reference internal" href="#canrecover" id="id21">CanRecover</a></li>
<li><a class="reference internal" href="#ceil-math" id="id22">Ceil (math)</a></li>
<li><a class="reference internal" href="#command" id="id23">Command (*,***)</a></li>
<li><a class="reference internal" href="#cond-math" id="id24">Cond (math)</a></li>
<li><a class="reference internal" href="#const" id="id25">Const (*)</a></li>
<li><a class="reference internal" href="#const240p" id="id26">Const240p</a></li>
<li><a class="reference internal" href="#const480p" id="id27">Const480p</a></li>
<li><a class="reference internal" href="#const720p" id="id28">Const720p</a></li>
<li><a class="reference internal" href="#cos-math" id="id29">Cos (math)</a></li>
<li><a class="reference internal" href="#ctrl" id="id30">Ctrl</a></li>
<li><a class="reference internal" href="#drawgame" id="id31">DrawGame</a></li>
<li><a class="reference internal" href="#e-math" id="id32">E (math)</a></li>
<li><a class="reference internal" href="#exp-math" id="id33">Exp (math)</a></li>
<li><a class="reference internal" href="#facing" id="id34">Facing</a></li>
<li><a class="reference internal" href="#floor-math" id="id35">Floor (math)</a></li>
<li><a class="reference internal" href="#frontedge" id="id36">FrontEdge</a></li>
<li><a class="reference internal" href="#frontedgebodydist" id="id37">FrontEdgeBodyDist</a></li>
<li><a class="reference internal" href="#frontedgedist" id="id38">FrontEdgeDist</a></li>
<li><a class="reference internal" href="#fvar" id="id39">FVar</a></li>
<li><a class="reference internal" href="#gameheight" id="id40">GameHeight</a></li>
<li><a class="reference internal" href="#gametime" id="id41">GameTime</a></li>
<li><a class="reference internal" href="#gamewidth" id="id42">GameWidth</a></li>
<li><a class="reference internal" href="#gethitvar" id="id43">GetHitVar(*)</a></li>
<li><a class="reference internal" href="#hitcount" id="id44">HitCount</a></li>
<li><a class="reference internal" href="#hitdefattr" id="id45">HitDefAttr(*,***)</a></li>
<li><a class="reference internal" href="#hitfall" id="id46">HitFall</a></li>
<li><a class="reference internal" href="#hitover" id="id47">HitOver</a></li>
<li><a class="reference internal" href="#hitpausetime" id="id48">HitPauseTime</a></li>
<li><a class="reference internal" href="#hitshakeover" id="id49">HitShakeOver</a></li>
<li><a class="reference internal" href="#hitvel" id="id50">HitVel</a></li>
<li><a class="reference internal" href="#id" id="id51">ID</a></li>
<li><a class="reference internal" href="#ifelse-math" id="id52">IfElse (math)</a></li>
<li><a class="reference internal" href="#inguarddist" id="id53">InGuardDist</a></li>
<li><a class="reference internal" href="#ishelper" id="id54">IsHelper</a></li>
<li><a class="reference internal" href="#ishometeam" id="id55">IsHomeTeam</a></li>
<li><a class="reference internal" href="#leftedge" id="id56">LeftEdge</a></li>
<li><a class="reference internal" href="#life" id="id57">Life</a></li>
<li><a class="reference internal" href="#lifemax" id="id58">LifeMax</a></li>
<li><a class="reference internal" href="#ln-math" id="id59">Ln (math)</a></li>
<li><a class="reference internal" href="#log-math" id="id60">Log (math)</a></li>
<li><a class="reference internal" href="#lose" id="id61">Lose</a></li>
<li><a class="reference internal" href="#matchno" id="id62">MatchNo</a></li>
<li><a class="reference internal" href="#matchover" id="id63">MatchOver</a></li>
<li><a class="reference internal" href="#movecontact" id="id64">MoveContact</a></li>
<li><a class="reference internal" href="#moveguarded" id="id65">MoveGuarded</a></li>
<li><a class="reference internal" href="#movehit" id="id66">MoveHit</a></li>
<li><a class="reference internal" href="#movetype" id="id67">MoveType(*,***)</a></li>
<li><a class="reference internal" href="#movereversed" id="id68">MoveReversed</a></li>
<li><a class="reference internal" href="#name" id="id69">Name(*,***)</a></li>
<li><a class="reference internal" href="#numenemy" id="id70">NumEnemy</a></li>
<li><a class="reference internal" href="#numexplod" id="id71">NumExplod</a></li>
<li><a class="reference internal" href="#numhelper" id="id72">NumHelper</a></li>
<li><a class="reference internal" href="#numpartner" id="id73">NumPartner</a></li>
<li><a class="reference internal" href="#numproj" id="id74">NumProj</a></li>
<li><a class="reference internal" href="#numprojid" id="id75">NumProjID</a></li>
<li><a class="reference internal" href="#numtarget" id="id76">NumTarget</a></li>
<li><a class="reference internal" href="#p1name" id="id77">P1Name(*,***)</a></li>
<li><a class="reference internal" href="#p2bodydist" id="id78">P2BodyDist</a></li>
<li><a class="reference internal" href="#p2dist" id="id79">P2Dist</a></li>
<li><a class="reference internal" href="#p2life" id="id80">P2Life</a></li>
<li><a class="reference internal" href="#p2movetype" id="id81">P2MoveType</a></li>
<li><a class="reference internal" href="#p2name" id="id82">P2Name(*,***)</a></li>
<li><a class="reference internal" href="#p2stateno" id="id83">P2StateNo</a></li>
<li><a class="reference internal" href="#p2statetype" id="id84">P2StateType</a></li>
<li><a class="reference internal" href="#p3name" id="id85">P3Name(*,***)</a></li>
<li><a class="reference internal" href="#p4name" id="id86">P4Name(*,***)</a></li>
<li><a class="reference internal" href="#palno" id="id87">PalNo</a></li>
<li><a class="reference internal" href="#parentdist" id="id88">ParentDist</a></li>
<li><a class="reference internal" href="#pi-math" id="id89">Pi (math)</a></li>
<li><a class="reference internal" href="#pos" id="id90">Pos</a></li>
<li><a class="reference internal" href="#power" id="id91">Power</a></li>
<li><a class="reference internal" href="#powermax" id="id92">PowerMax</a></li>
<li><a class="reference internal" href="#playeridexist" id="id93">PlayerIDExist</a></li>
<li><a class="reference internal" href="#prevstateno" id="id94">PrevStateNo</a></li>
<li><a class="reference internal" href="#projcanceltime" id="id95">ProjCancelTime</a></li>
<li><a class="reference internal" href="#projcontact" id="id96">ProjContact(*,***)</a></li>
<li><a class="reference internal" href="#projcontacttime" id="id97">ProjContactTime</a></li>
<li><a class="reference internal" href="#projguarded" id="id98">ProjGuarded(*,***)</a></li>
<li><a class="reference internal" href="#projguardedtime" id="id99">ProjGuardedTime</a></li>
<li><a class="reference internal" href="#projhit" id="id100">ProjHit(*,***)</a></li>
<li><a class="reference internal" href="#projhittime" id="id101">ProjHitTime</a></li>
<li><a class="reference internal" href="#random" id="id102">Random</a></li>
<li><a class="reference internal" href="#rightedge" id="id103">RightEdge</a></li>
<li><a class="reference internal" href="#rootdist" id="id104">RootDist</a></li>
<li><a class="reference internal" href="#roundno" id="id105">RoundNo</a></li>
<li><a class="reference internal" href="#roundsexisted" id="id106">RoundsExisted</a></li>
<li><a class="reference internal" href="#roundstate" id="id107">RoundState</a></li>
<li><a class="reference internal" href="#screenpos" id="id108">ScreenPos</a></li>
<li><a class="reference internal" href="#screenheight" id="id109">ScreenHeight</a></li>
<li><a class="reference internal" href="#screenwidth" id="id110">ScreenWidth</a></li>
<li><a class="reference internal" href="#selfanimexist" id="id111">SelfAnimExist</a></li>
<li><a class="reference internal" href="#sin-math" id="id112">Sin (math)</a></li>
<li><a class="reference internal" href="#stateno" id="id113">StateNo</a></li>
<li><a class="reference internal" href="#statetype" id="id114">StateType</a></li>
<li><a class="reference internal" href="#stagevar" id="id115">StageVar(*,***)</a></li>
<li><a class="reference internal" href="#sysfvar" id="id116">SysFVar</a></li>
<li><a class="reference internal" href="#sysvar" id="id117">SysVar</a></li>
<li><a class="reference internal" href="#tan-math" id="id118">Tan (math)</a></li>
<li><a class="reference internal" href="#teammode" id="id119">TeamMode(*,***)</a></li>
<li><a class="reference internal" href="#teamside" id="id120">TeamSide</a></li>
<li><a class="reference internal" href="#tickspersecond" id="id121">TicksPerSecond</a></li>
<li><a class="reference internal" href="#time" id="id122">Time</a></li>
<li><a class="reference internal" href="#timemod" id="id123">TimeMod(*,**,***)</a></li>
<li><a class="reference internal" href="#topedge" id="id124">TopEdge</a></li>
<li><a class="reference internal" href="#uniqhitcount" id="id125">UniqHitCount</a></li>
<li><a class="reference internal" href="#var" id="id126">Var</a></li>
<li><a class="reference internal" href="#vel" id="id127">Vel</a></li>
<li><a class="reference internal" href="#win" id="id128">Win</a></li>
</ul>
</li>
</ul>
</div>
<div class="section" id="about-triggers">
<h1><a class="toc-backref" href="#id1">About Triggers</a></h1>
<p>This is an alphabetical index of function-type triggers. For details on use of function-type triggers in expressions, see the expression documentation. Unless otherwise specified, we will use P1 to represent the player who is evaluating the trigger, and P2 to represent his opponent (usually the closest opponent when in team mode).</p>
<p>Some triggers are nonstandard and cannot take expressions as their arguments. These are marked with a (*) in the index. Some triggers are deprecated; these are marked with a (**). Use of these triggers is not encouraged, as support for them may be removed in future versions of the engine.</p>
<p>Old-style triggers, marked (***), appear only in clauses of the form (trigger) (relational operator) (value). See section 8 of exp.doc for more details.</p>
<p>Triggers used for math are marked with (math).</p>
<p>For all triggers, bottom will be returned if the trigger is redirected to a nonexistent destination, or if the ID number for the redirection evaluates to bottom. This is not listed in the error conditions for each trigger.</p>
<div class="section" id="abs-math">
<h2><a class="toc-backref" href="#id2">Abs (math)</a></h2>
<p>Computes the absolute value of its argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>abs(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the absolute value of.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>Same as the type of exprn.</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
</div>
<div class="section" id="acos-math">
<h2><a class="toc-backref" href="#id3">Acos (math)</a></h2>
<p>Computes the arccosine (in radians) of the specified argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>acos(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the arccosine of (float).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn is not in
the domain of arccosine (which is [-1.0,1.0]).</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = acos(1)
  Sets value to the arccosine of 1, which is approximately 0.0
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="ailevel">
<h2><a class="toc-backref" href="#id4">AILevel</a></h2>
<p>Returns the difficulty level of the player's AI.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AILevel</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>If AI is enabled on the player, the value ranges from 1 (easiest) to 8 (most difficult).
If AI is not enabled on the player, the return value is 0.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Random &lt; AILevel * 10
  Triggers with 10% probability at AILevel 1, 20% at AILevel 2,
  etc.
</pre>
</div>
<div class="section" id="alive">
<h2><a class="toc-backref" href="#id5">Alive</a></h2>
<p>Returns 1 if the player is still able to fight, 0 if the player has been KOed.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>alive</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Alive = 0
  Triggers if the player has been KOed.
</pre>
</div>
<div class="section" id="anim">
<h2><a class="toc-backref" href="#id6">Anim</a></h2>
<p>Returns the current animation action number of the player.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Anim</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Anim = 200
  Triggers if the player is currently in action 200.
</pre>
</div>
<div class="section" id="animelem">
<h2><a class="toc-backref" href="#id7">AnimElem(*,***)</a></h2>
<p>Gets the animation-time elapsed since the start of a specified element of the current animation action. Useful for synchronizing events to elements of an animation action.
(reminder: first element of an action is element 1, not 0)</p>
<p>AnimElemTime has similar functionality to AnimElem, but can take expressions as its argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>AnimElem = value1</li>
<li>AnimElem = value1, [oper] value2</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=, &lt;, &gt;, &lt;=, &gt;=</dd>
<dt>value1 (int)</dt>
<dd>Element number to check.</dd>
<dt>value2 (int)</dt>
<dd>Value of animation-time to compare with.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if the specified element number is invalid for this
action (e.g., it's too large or too small).</dd>
<dt>Details:</dt>
<dd><p class="first">Trigger in Format 1 is true if the player's animation is
at the start of the element number specified by value1.
In other words, if value1 is equal to n, it is true on the
first game-tick of the nth element of the animation.</p>
<p class="last">Trigger in Format 2 compares the player's animation-time
to t+value2, where t is time of the start of the element
number specified by value1.</p>
</dd>
<dt>Notes:</dt>
<dd>AnimElem will not trigger on the first game-tick of the second or
later loop of an animation with a finite looptime. For example,
&quot;AnimElem = 1&quot; will trigger the first tick a player changes to an
animation, but will not trigger on the tick that it loops. You may
get it to trigger each time using &quot;AnimElem = 1 || AnimTime = 0&quot;.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = AnimElem = 2
  True on the first game-tick that the player's animation
  is on element 2. Is equivalent to saying:
    trigger1 = AnimElem = 2, = 0

trigger1 = AnimElem = 2, = 4
  True 4 game-ticks after the start of the player's
  second animation element.

trigger1 = AnimElem = 2, &gt;= 0
trigger1 = AnimElem = 3, &lt; 0
  True for the whole of the second element of the player's
  animation, assuming there is a third element. If a
  third element does not exist, the second line should
  read,

    trigger1 = AnimTime &lt;= 0
</pre>
</div>
<div class="section" id="animelemno">
<h2><a class="toc-backref" href="#id8">AnimElemNo</a></h2>
<p>Returns the number of the animation element in the current action
that would be displayed at the specified time. The argument to AnimElemNo represents the time to check, expressed in game ticks, relative to the present.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AnimElemNo(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression that evaluates to the time offset (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if you try to check a time that would fall before the
start of the current action.</dd>
<dt>Notes:</dt>
<dd>If the action is currently within its looping portion, then it is
assumed to have been looping forever. That is, no matter how far into
the past you check, AnimElemNo will always return an element number
that lies within the looping portion of the action.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = AnimElemNo(0) = 2
  True when the animation element to be displayed 0 ticks in the
  future (i.e., now) is element 2. This is equivalent to:
    trigger1 = AnimElem = 2, &gt;= 0
    trigger1 = AnimElem = 3, &lt; 0

trigger1 = AnimElemNo(2) = 4
  True when the animation element that will be displayed two ticks
  from now is element 4. This is equivalent to:
    trigger1 = AnimElem = 4, &gt;= -2
    trigger1 = AnimElem = 5, &lt; -2
</pre>
</div>
<div class="section" id="animelemtime">
<h2><a class="toc-backref" href="#id9">AnimElemTime</a></h2>
<p>Gets the animation-time elapsed since the start of a specified element of the current animation action. Useful for synchronizing events to elements of an animation action.
(reminder: first element of an action is element 1, not 0)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AnimElemTime(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression that evaluates to the element number to check (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn evaluates
to an element number that is not valid for the current action.</dd>
<dt>Notes:</dt>
<dd>AnimElemTime will not trigger on the first game-tick of the second or later loop of an animation with a finite looptime. For example, &quot;AnimElemTime(1) = 0&quot; will trigger the first tick a player changes to an animation, but will not trigger on the tick that it loops. You may get it to trigger each time using &quot;AnimElemTime(1) = 0 || AnimTime = 0&quot;.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = AnimElemTime(2) = 0
  True on the first game-tick that the player's animation
  is on element 2. Is equivalent to saying:
    trigger1 = AnimElem = 2

trigger1 = AnimElemTime(2) = 4
  True 4 game-ticks after the start of the player's
  second animation element.

trigger1 = AnimElemTime(2) &gt;= 0
trigger1 = AnimElemTime(3) &lt; 0
  True for the whole of the second element of the player's
  animation, assuming there is a third element. If a
  third element does not exist, the second line will evaluate
  to bottom and hence trigger1 will never trigger. In this case,
  the second line should read,
    trigger1 = AnimTime &lt;= 0
</pre>
</div>
<div class="section" id="animexist">
<h2><a class="toc-backref" href="#id10">AnimExist</a></h2>
<p>Returns 1 if the specified animation action exists for the player.
The result of this trigger is undefined if the player has been placed in a custom state by a successful hit. In this situation, use SelfAnimExist.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AnimExist(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>An expression evaluating to an animation number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = !AnimExist(200)
  Triggers if the player is missing action 200.
</pre>
</div>
<div class="section" id="animtime">
<h2><a class="toc-backref" href="#id11">AnimTime</a></h2>
<p>Gives the difference between the looptime of the current animation action and the player's animation-time. Useful for knowing when the end of the animation has been reached. (Animation-time is the time in game-ticks that the player has spent within the current animation action.)
The name may be confusing. Try to think of it as &quot;time from the end of the animation&quot;. During the animation, AnimTime will always return a non-positive number.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AnimTime</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = AnimTime = 0
  Triggers when the animation-time is equal to the animation
  action's looptime, ie. the end of the action has been
  reached.
</pre>
</div>
<div class="section" id="asin-math">
<h2><a class="toc-backref" href="#id12">Asin (math)</a></h2>
<p>Computes the arcsine (in radians) of the specified argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>asin(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the arcsine of (float).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn is not in
the domain of arcsine (which is [-1.0,1.0]).</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = asin(1)
  Sets value to the arcsine of 1, which is approximately pi/2
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="atan-math">
<h2><a class="toc-backref" href="#id13">Atan (math)</a></h2>
<p>Computes the arctangent (in radians) of the specified argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>atan(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the arctangent of (float).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = atan(1)
  Sets value to the arccosine of 1, which is approximately pi/4
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="authorname">
<h2><a class="toc-backref" href="#id14">AuthorName(*,***)</a></h2>
<p>Returns the player's author's name (specified in the .DEF file). This may also be useful for telling apart characters with the same name but different authors.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>AuthorName [oper] &quot;name&quot;</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, != (other operators not valid)</dd>
<dt>&quot;name&quot; (string)</dt>
<dd>Name to compare against. Must be in double quotes.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Authorname = &quot;Suika&quot;
  Returns true if the character's author is named Suika.
</pre>
</div>
<div class="section" id="backedge">
<h2><a class="toc-backref" href="#id15">BackEdge</a></h2>
<p>BackEdge returns the x position of the edge of the screen that is behind the player, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>BackEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;ifelse(facing = 1, LeftEdge, RightEdge)&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos X + CameraPos X &lt; BackEdge
  Triggers if the player is to the left of the back edge of the screen.
</pre>
</div>
<div class="section" id="backedgebodydist">
<h2><a class="toc-backref" href="#id16">BackEdgeBodyDist</a></h2>
<p>BackEdgeBodyDist gives the distance from the back of the player, as determined by the end of his width bar, to the back edge of the screen.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>BackEdgeBodyDist</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = BackEdgeBodyDist &lt; 30
  Triggers if the back of the player’s width bar is within 30 pixels
  of the edge of the screen in back of him.
</pre>
</div>
<div class="section" id="backedgedist">
<h2><a class="toc-backref" href="#id17">BackEdgeDist</a></h2>
<p>BackEdgeDist gives the distance between the x-axis of the player and the edge of the screen behind of the player.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>BackEdgeDist</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = BackEdgeDist &lt; 30
  Triggers if the x-axis of the player is within 30 pixels
  of the edge of the screen in back of him.
</pre>
</div>
<div class="section" id="bottomedge">
<h2><a class="toc-backref" href="#id18">BottomEdge</a></h2>
<p>BottomEdge returns the y position of the bottom edge of the screen, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>BottomEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;Pos Y - ScreenPos Y + GameHeight&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos Y &lt; BottomEdge
  Triggers if the player is above the bottom edge of the screen.
</pre>
</div>
<div class="section" id="camerapos">
<h2><a class="toc-backref" href="#id19">CameraPos</a></h2>
<p>Gets the value of the camera's position relative to the stage.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>CameraPos [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">The home position of the camera is 0, 0.
The value of &quot;CameraPos X&quot; increases as the camera moves to the right.
The value of &quot;CameraPos Y&quot; decreases as the camera moves upwards.</p>
<p class="last">The units of the position returned is in the coordspace of the player.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = CameraPos X &gt;= 0
  True when the camera is to the left of the center of the stage.
</pre>
</div>
<div class="section" id="camerazoom">
<h2><a class="toc-backref" href="#id20">CameraZoom</a></h2>
<p>Gets the value of the camera's zoom factor.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>CameraZoom</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>The zoom factor de</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
fvar(1) = CameraZoom * ScreenWidth
  Sets fvar(1) to the distance between the left and right edges
  of the screen.  The expression &quot;CameraZoom * ScreenWidth&quot; is
  equivalent to the GameWidth trigger.
</pre>
</div>
<div class="section" id="canrecover">
<h2><a class="toc-backref" href="#id21">CanRecover</a></h2>
<p>If the player is currently in a falling state, returns 1 if he is currently able to recover, and 0 if he is not currently able to recover. If the player is not currently falling, the output of this trigger is undefined.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>CanRecover</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="ceil-math">
<h2><a class="toc-backref" href="#id22">Ceil (math)</a></h2>
<p>Implements the &quot;ceiling&quot; function. Returns the least integer which is greater than or equal to the specified argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ceil(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the ceil of.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
1. value = ceil(5.5)
  Sets value to 6.
2. value = ceil(-2)
  Sets value to -2.
</pre>
</div>
<div class="section" id="command">
<h2><a class="toc-backref" href="#id23">Command (*,***)</a></h2>
<p>Triggers if the user has input the specified command.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Command [oper] &quot;command_name&quot;</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, != (other operators not valid)</dd>
<dt>&quot;command_name&quot; (string)</dt>
<dd>Name of the command. Commands are defined in the
player's CMD file, and are case-sensitive.
If the CMD has multiple commands with the same name,
then any one of those commands will work. Command names
must appear within double quotes.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Command = &quot;fireball motion&quot;
  True if the user inputs the command corresponding to the
  command name &quot;fireball motion&quot;.
</pre>
</div>
<div class="section" id="cond-math">
<h2><a class="toc-backref" href="#id24">Cond (math)</a></h2>
<p>This trigger takes three arguments. The first argument is a condition argument.
If the condition is true (i.e., nonzero), Cond evaluates and returns the second
argument. If the condition is false, Cond evaluates and returns the third
argument. If the condition is bottom, then Cond returns bottom without
evaluating the second or third arguments.</p>
<p>In all cases, any unused argument(s) are not evaluated. Therefore, Cond can be
used instead of IfElse to avoid any side effects that would be caused by
evaluating the unused argument (e.g., variable assignment, or performing a
computation that would cause bottom to be generated).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Cond(exp_cond,exp_true,exp_false)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exp_cond</dt>
<dd>Expression to test.</dd>
<dt>exp_true</dt>
<dd>Expression specifying value to return if exp_cond is nonzero.</dd>
<dt>exp_false</dt>
<dd>Expression specifying value to return if exp_cond is zero.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>Type of exp_true or exp_false, whichever is returned.</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exp_cond evaluates to bottom, or if exp_true or exp_false
(whichever is actually used) evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = Cond(var(3),1,2)
  Sets value to 1 if var(3) is not zero, and sets value to 2 if
  var(3) is 0.
</pre>
</div>
<div class="section" id="const">
<h2><a class="toc-backref" href="#id25">Const (*)</a></h2>
<p>Returns the value of one of the player's constants.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Const(param_name)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>param_name</dt>
<dd>The name of the constant to check. Valid values are:</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>Depends on specified hit parameter. See Details.</dd>
</dl>
<p>Error conditions:
none</p>
<dl class="docutils">
<dt>Details:</dt>
<dd><p class="first">The following values of param_name return values specified in the
[Data] group in the player's constants.</p>
<ul class="simple">
<li>data.life: Returns value of the &quot;life&quot; parameter. (int)</li>
<li>data.power: Returns value of the &quot;power&quot; parameter. (int)</li>
<li>data.attack: Returns value of the &quot;attack&quot; parameter. (int)</li>
<li>data.defence: Returns value of the &quot;defence&quot; parameter. (int)</li>
<li>data.fall.defence_mul: Returns value of the defence multiplier,
calculated as 100/(f+100), where f is the &quot;fall.defence_up&quot;
parameter. (float)</li>
<li>data.liedown.time: Returns value of the &quot;liedown.time&quot; parameter. (int)</li>
<li>data.airjuggle: Returns value of the &quot;airjuggle&quot; parameter. (int)</li>
<li>data.sparkno: Returns value of the &quot;sparkno&quot; parameter. (int)</li>
<li>data.guard.sparkno: Returns value of the &quot;guard.sparkno&quot; parameter. (int)</li>
<li>data.KO.echo: Returns value of the &quot;ko.echo&quot; parameter. (int)</li>
<li>data.IntPersistIndex: Returns value of the &quot;IntPersistIndex&quot;
parameter. (int)</li>
<li>data.FloatPersistIndex: Returns value of the &quot;FloatPersistIndex&quot;
parameter. (int)</li>
</ul>
<p>The following values of param_name return values specified in the
[Size] group in the player's constants.</p>
<ul class="simple">
<li>size.xscale: Returns value of the &quot;xscale&quot; parameter. (float)</li>
<li>size.yscale: Returns value of the &quot;yscale&quot; parameter. (float)</li>
<li>size.ground.back: Returns value of the &quot;ground.back&quot; parameter. (int)</li>
<li>size.ground.front: Returns value of the &quot;ground.front&quot; parameter.
(int)</li>
<li>size.air.back: Returns value of the &quot;air.back&quot; parameter. (int)</li>
<li>size.air.front: Returns value of the &quot;air.front&quot; parameter. (int)</li>
<li>size.height: Returns value of the &quot;height&quot; parameter. (int)</li>
<li>size.attack.dist: Returns value of the &quot;attack.dist&quot; parameter. (int)</li>
<li>size.proj.attack.dist: Returns value of the &quot;proj.attack.dist&quot;
parameter. (int)</li>
<li>size.proj.doscale: Returns value of the &quot;proj.doscale&quot; parameter.
(int)</li>
<li>size.head.pos.x: Returns x-component of the &quot;head.pos&quot; parameter.
(int)</li>
<li>size.head.pos.y: Returns y-component of the &quot;head.pos&quot; parameter.
(int)</li>
<li>size.mid.pos.x: Returns x-component of the &quot;mid.pos&quot; parameter.
(int)</li>
<li>size.mid.pos.y: Returns y-component of the &quot;mid.pos&quot; parameter.
(int)</li>
<li>size.shadowoffset: Returns value of the &quot;shadowoffset&quot; parameter.
(int)</li>
<li>size.draw.offset.x: Returns x-component of the &quot;draw.offset&quot;
parameter. (int)</li>
<li>size.draw.offset.y: Returns y-component of the &quot;draw.offset&quot;
parameter. (int)</li>
</ul>
<p>The following values of param_name return values specified in the
[Velocity] group in the player's constants.</p>
<ul class="simple">
<li>velocity.walk.fwd.x: Returns value of the &quot;walk.fwd&quot; parameter.
(float)</li>
<li>velocity.walk.back.x: Returns value of the &quot;walk.back&quot; parameter.
(float)</li>
<li>velocity.run.fwd.x: Returns x-component of the &quot;run.fwd&quot; parameter.
(float)</li>
<li>velocity.run.fwd.y: Returns y-component of the &quot;run.fwd&quot; parameter.
(float)</li>
<li>velocity.run.back.x: Returns x-component of the &quot;run.back&quot; parameter.
(float)</li>
<li>velocity.run.back.y: Returns y-component of the &quot;run.back&quot; parameter.
(float)</li>
<li>velocity.jump.y: Returns y-component of the &quot;jump.neu&quot; parameter.
Note: this is NOT &quot;velocity.jump.neu.y&quot;. Only the &quot;neu&quot;
parameters take a y-component value. (float)</li>
<li>velocity.jump.neu.x: Returns x-component of the &quot;jump.neu&quot; parameter.
(float)</li>
<li>velocity.jump.back.x: Returns value of the &quot;jump.back&quot; paramamter.
(float)</li>
<li>velocity.jump.fwd.x: Returns value of the &quot;jump.fwd&quot; parameter.
(float)</li>
<li>velocity.runjump.back.x: Returns value of the &quot;runjump.back&quot;
paramamter. (float)</li>
<li>velocity.runjump.fwd.x: Returns value of the &quot;runjump.fwd&quot; parameter.
(float)</li>
<li>velocity.airjump.y: Returns y-component of the &quot;airjump.neu&quot;
parameter. Note: this is NOT &quot;velocity.airjump.neu.y&quot;.
(float)</li>
<li>velocity.airjump.neu.x: Returns x-component of the &quot;airjump.neu&quot;
parameter. (float)</li>
<li>velocity.airjump.back.x: Returns value of the &quot;airjump.back&quot;
paramamter. (float)</li>
<li>velocity.airjump.fwd.x: Returns value of the &quot;airjump.fwd&quot; parameter.
(float)</li>
<li>velocity.air.gethit.groundrecover.x: Returns x-component of the &quot;air.gethit.groundrecover&quot; parameter.
(float)</li>
<li>velocity.air.gethit.groundrecover.y: Returns y-component of the &quot;air.gethit.groundrecover&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.mul.x: Returns x-component of the &quot;air.gethit.airrecover.mul&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.mul.y: Returns x-component of the &quot;air.gethit.airrecover.mul&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.add.x: Returns x-component of the &quot;air.gethit.airrecover.add&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.add.y: Returns x-component of the &quot;air.gethit.airrecover.add&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.back: Returns value of the &quot;air.gethit.airrecover.back&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.fwd: Returns value of the &quot;air.gethit.airrecover.fwd&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.up: Returns value of the &quot;air.gethit.airrecover.up&quot; parameter.
(float)</li>
<li>velocity.air.gethit.airrecover.down: Returns value of the &quot;air.gethit.airrecover.down&quot; parameter.
(float)</li>
</ul>
<p>The following values of param_name return values specified in the
[Movement] group in the player's constants.</p>
<ul class="last simple">
<li>movement.airjump.num: Returns value of the &quot;airjump.num&quot; parameter.
(int)</li>
<li>movement.airjump.height: Returns value of the &quot;airjump.height&quot;
parameter. (int)</li>
<li>movement.yaccel: Returns value of the &quot;yaccel&quot; parameter. (float)</li>
<li>movement.stand.friction: Returns value of the &quot;stand.friction&quot;
parameter. (float)</li>
<li>movement.crouch.friction: Returns value of the &quot;crouch.friction&quot;
parameter. (float)</li>
<li>movement.stand.friction.threshold: Returns value of the &quot;stand.friction.threshold&quot; parameter.
(float)</li>
<li>movement.crouch.friction.threshold: Returns value of the &quot;crouch.friction.threshold&quot; parameter.
(float)</li>
<li>movement.jump.changeanim.threshold: Returns value of the &quot;jump.changeanim.threshold&quot; parameter.
(float)</li>
<li>movement.air.gethit.groundlevel: Returns value of the &quot;air.gethit.groundlevel&quot; parameter.
(float)</li>
<li>movement.air.gethit.groundrecover.ground.threshold: Returns value of the &quot;air.gethit.groundrecover.ground.threshold&quot; parameter.
(float)</li>
<li>movement.air.gethit.groundrecover.groundlevel: Returns value of the &quot;air.gethit.groundrecover.groundlevel&quot; parameter.
(float)</li>
<li>movement.air.gethit.airrecover.threshold: Returns value of the &quot;air.gethit.airrecover.threshold&quot; parameter.
(float)</li>
<li>movement.air.gethit.airrecover.yaccel: Returns value of the &quot;air.gethit.airrecover.yaccel&quot; parameter.
(float)</li>
<li>movement.air.gethit.trip.groundlevel: Returns value of the &quot;air.gethit.trip.groundlevel&quot; parameter.
(float)</li>
<li>movement.down.bounce.offset.x: Returns x-component of the &quot;down.bounce.offset.x&quot; parameter.
(float)</li>
<li>movement.down.bounce.offset.y: Returns y-component of the &quot;down.bounce.offset.y&quot; parameter.
(float)</li>
<li>movement.down.bounce.yaccel: Returns value of the &quot;down.bounce.yaccel&quot; parameter.
(float)</li>
<li>movement.down.bounce.groundlevel: Returns value of the &quot;down.bounce.groundlevel&quot; parameter.
(float)</li>
<li>movement.down.friction.threshold: Returns value of the &quot;down.friction.threshold&quot; parameter.
(float)</li>
</ul>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Const(velocity.walk.fwd.x) &gt; 4
  Triggers if the forward walking velocity is greater than 4.
</pre>
</div>
<div class="section" id="const240p">
<h2><a class="toc-backref" href="#id26">Const240p</a></h2>
<p>Converts a value from the 240p coordinate space to the player's coordinate space.
The conversion ratio between coordinate spaces is the ratio of their widths.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Const240p(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression containing the value to convert. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
<dt>Notes:</dt>
<dd>Non-zero position and velocity offset values in common1.cns should use one of
the Const triggers to maintain consistency with characters from a different
coordinate space.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = Const240p(3)
  Sets value 3 if the player has a coordinate space of 320x240 (240p).
  Sets value 6 if the player has a coordinate space of 640x480 (480p).
  Sets value 12 if the player has a coordinate space of 1280x720 (720p).
</pre>
</div>
<div class="section" id="const480p">
<h2><a class="toc-backref" href="#id27">Const480p</a></h2>
<p>Converts a value from the 480p coordinate space to the player's coordinate space.
The conversion ratio between coordinate spaces is the ratio of their widths.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Const480p(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression containing the value to convert. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
<dt>Notes:</dt>
<dd>Non-zero position and velocity offset values in common1.cns should use one of
the Const triggers to maintain consistency with characters from a different
coordinate space.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = Const480p(6)
  Sets value 3 if the player has a coordinate space of 320x240 (240p).
  Sets value 6 if the player has a coordinate space of 640x480 (480p).
  Sets value 12 if the player has a coordinate space of 1280x720 (720p).
</pre>
</div>
<div class="section" id="const720p">
<h2><a class="toc-backref" href="#id28">Const720p</a></h2>
<p>Converts a value from the 720p coordinate space to the player's coordinate space.
The conversion ratio between coordinate spaces is the ratio of their widths.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Const720p(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression containing the value to convert. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
<dt>Notes:</dt>
<dd>Non-zero position and velocity offset values in common1.cns should use one of
the Const triggers to maintain consistency with characters from a different
coordinate space.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = Const720p(12)
  Sets value 3 if the player has a coordinate space of 320x240 (240p).
  Sets value 6 if the player has a coordinate space of 640x480 (480p).
  Sets value 12 if the player has a coordinate space of 1280x720 (720p).
</pre>
</div>
<div class="section" id="cos-math">
<h2><a class="toc-backref" href="#id29">Cos (math)</a></h2>
<p>Computes the cosine of the specified argument (in radians.)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>cos(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the cosine of. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = cos(0)
  Sets value to the cosine of 0, which is approximately 1.0
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="ctrl">
<h2><a class="toc-backref" href="#id30">Ctrl</a></h2>
<p>Returns the control flag of p1.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Ctrl</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Ctrl
  Triggers if the player has control.
</pre>
</div>
<div class="section" id="drawgame">
<h2><a class="toc-backref" href="#id31">DrawGame</a></h2>
<p>Returns 1 if the player (or the player's team, in team mode) has ended the round in a draw, 0 otherwise.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Draw</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = DrawGame
  Triggers if the player (or team) ended round in a draw.
</pre>
</div>
<div class="section" id="e-math">
<h2><a class="toc-backref" href="#id32">E (math)</a></h2>
<p>Returns the value of e (2.718281828...)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>e</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="exp-math">
<h2><a class="toc-backref" href="#id33">Exp (math)</a></h2>
<p>Computes the exponential of the argument (e raised to the power of
the argument.) This produces slightly more accurate results than the
equivalent expression e**(argument).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>exp(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the exponential of (float).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = exp(4-var(0))
  Sets value to e raised to the quantity 4-var(0).
</pre>
</div>
<div class="section" id="facing">
<h2><a class="toc-backref" href="#id34">Facing</a></h2>
<p>Returns 1 if the player is facing to the right, and -1 if the player is facing to the left.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Facing</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
Trigger = Facing = -1
  Triggers if the player is facing toward the left of the screen.
</pre>
</div>
<div class="section" id="floor-math">
<h2><a class="toc-backref" href="#id35">Floor (math)</a></h2>
<p>Implements the floor function. Returns the greatest integer less than or equal to its argument.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>floor(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the floor of.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. value=floor(5.5)
  Sets value to 5.
2. value=floor(-2)
  Sets value to -2.
</pre>
</div>
<div class="section" id="frontedge">
<h2><a class="toc-backref" href="#id36">FrontEdge</a></h2>
<p>FrontEdge returns the x position of the edge of the screen that is in front the player, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>FrontEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;ifelse(facing = 1, RightEdge, LeftEdge)&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = facing * (Pos X + CameraPos X) &lt; facing * (FrontEdge)
  Triggers if the player is behind the front edge of the screen.
</pre>
</div>
<div class="section" id="frontedgebodydist">
<h2><a class="toc-backref" href="#id37">FrontEdgeBodyDist</a></h2>
<p>FrontEdgeBodyDist gives the distance between the front of the player (as determined by the front edge of his width bar) and the edge of the screen.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>FrontEdgeBodyDist</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = FrontEdgeBodyDist &lt; 30
  Triggers if the front of the player is within 30 pixels
  of the edge of the screen in front of him.
</pre>
</div>
<div class="section" id="frontedgedist">
<h2><a class="toc-backref" href="#id38">FrontEdgeDist</a></h2>
<p>FrontEdgeDist gives the distance between the x-axis of the player and the edge of the screen in front of the player.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>FrontEdgeDist</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = FrontEdgeDist &lt; 30
  Triggers if the x-axis of the player is within 30 pixels
  of the edge of the screen in front of him.
</pre>
</div>
<div class="section" id="fvar">
<h2><a class="toc-backref" href="#id39">FVar</a></h2>
<p>This trigger takes a mandatory variable number as an argument. It returns the value of the player's specified float variable.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>FVar(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>An expression evaluating to a variable number. Valid numbers
at this time are 0-39.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn evaluates
to an invalid variable index.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = FVar(5) = -1.23
  Triggers if the value of float variable 5 is -1.23.
</pre>
</div>
<div class="section" id="gameheight">
<h2><a class="toc-backref" href="#id40">GameHeight</a></h2>
<p>Returns the current height of the game space in the player's local coordinate space.
The game space is defined as the currently-visible area of the stage in which players interact.
The dimensions of the game space at a zoom factor of 1.0 is specified by the
GameWidth and GameHeight parameters in mugen.cfg.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>GameHeight</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd><p class="first">GameWidth and GameHeight scale inversely with the zoom factor of the camera.
For example, if the camera zoom factor is 0.5, the values returned by GameWidth
and GameHeight will be double that of at zoom factor 1.</p>
<p class="last">ScreenWidth and ScreenHeight are the equivalent triggers that are not
affected by the camera zoom factor.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = ScreenPos Y &lt; GameHeight / 2
  Triggers if the player is above the center of the screen.
</pre>
</div>
<div class="section" id="gametime">
<h2><a class="toc-backref" href="#id41">GameTime</a></h2>
<p>Returns the total number of ticks that have elapsed in the game so far.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>GameTime</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = (GameTime % 27) = 0
  Triggers every 27th game tick.
</pre>
</div>
<div class="section" id="gamewidth">
<h2><a class="toc-backref" href="#id42">GameWidth</a></h2>
<p>Returns the current width of the game space in the player's local coordinate space.
The game space is defined as the currently-visible area of the stage in which players interact.
The dimensions of the game space at a zoom factor of 1.0 is specified by the
GameWidth and GameHeight parameters in mugen.cfg.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>GameHeight</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd><p class="first">GameWidth and GameHeight scale inversely with the zoom factor of the camera.
For example, if the camera zoom factor is 0.5, the values returned by GameWidth
and GameHeight will be double that of at zoom factor 1.</p>
<p class="last">ScreenWidth and ScreenHeight are the equivalent triggers that are not
affected by the camera zoom factor.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = ScreenPos X &gt;= GameWidth / 2
  Triggers if the player is to the right of the center of the screen.
</pre>
</div>
<div class="section" id="gethitvar">
<h2><a class="toc-backref" href="#id43">GetHitVar(*)</a></h2>
<p>When the player is in a gethit state, returns the value of the specified hit parameter.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>GetHitVar(param_name)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>param_name</dt>
<dd><dl class="first last docutils">
<dt>The name of the hit parameter to check. Valid values are:</dt>
<dd>xveladd, yveladd, type, animtype, airtype, groundtype, damage,
hitcount, fallcount, hitshaketime, hittime, slidetime, ctrltime,
recovertime, xoff, yoff, zoff, xvel, yvel, yaccel, hitid,
chainid, guarded, fall, fall.damage, fall.xvel, fall.yvel,
fall.recover, fall.time, fall.recovertime.</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>Depends on specified hit parameter. See Details.</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><ul class="first last simple">
<li>xveladd: Returns the additional x-velocity that is added to the
player's own when he is KOed. (float)</li>
<li>yveladd: Returns the additional y-velocity that is added to the
player's own when he is KOed. (float)</li>
<li>type: Returns the type of the hit: 0 for none, 1 for high, 2 for
low, 3 for trip (ground only).</li>
<li>animtype: Returns the animation type of the hit. (0 for light, 1 for
medium, 2 for hard, 3 for back, 4 for up, 5 for diag-up)</li>
<li>airtype: Returns the type specified in the HitDef for an air hit.</li>
<li>groundtype: Returns the type specified in the HitDef for a ground
hit.</li>
<li>damage: Returns the damage given by the hit. (int)</li>
<li>hitcount: Returns the number of hits taken by the player in current
combo. (int)</li>
<li>fallcount: Returns the number of times player has hit the ground in
the current combo. (int)</li>
<li>hitshaketime: Returns time player is &quot;frozen&quot; during the hit. This
number counts down by 1 for each game tick, and stops
when it reaches zero. (int)</li>
<li>hittime: Returns time before player regains control and returns to
an idle state after being hit.
This counts down by 1 per game tick, as long as hitshaketime
(see above) is greater than 0. It stops counting down when
the value reaches -1. (int)
&quot;GetHitVar(hittime) &lt; 0&quot; is equivalent to the HitOver
trigger.</li>
<li>slidetime: Returns time that player slides backwards (on the ground)
after the hit. (int)</li>
<li>ctrltime: Returns time before player regains control after guarding
the hit. (int)</li>
<li>recovertime: Returns time before player gets up from liedown state
This number counts down to 0 for each game tick, and
will count down faster if buttons are hit. (int)</li>
<li>xoff: &quot;Snap&quot; x offset when hit (deprecated)</li>
<li>yoff: &quot;Snap&quot; y offset when hit (deprecated)</li>
<li>xvel: Fixed x-velocity imparted by hit. (float)</li>
<li>yvel: Fixed y-velocity imparted by hit. (float)</li>
<li>yaccel: y acceleration set by the hit. (float)</li>
<li>chainid: Player-assigned chainID for last hit taken. (int)</li>
<li>guarded: True if the last hit was guarded, false otherwise.</li>
<li>isbound: True if the player is the subject of an attacker's
TargetBind controller. Useful to prevent being stuck in
thrown states. (int)</li>
<li>fall: True if falling, false otherwise (int)</li>
<li>fall.damage: Damage taken upon fall (int)</li>
<li>fall.xvel: x velocity after bouncing off ground (float)</li>
<li>fall.yvel: y velocity after bouncing off ground (float)</li>
<li>fall.recover: True if player can recover, false otherwise.</li>
<li>fall.recovertime: time before player can recover. (int)</li>
<li>fall.kill: value of fall.kill parameter in attacker's hitdef. (int)</li>
<li>fall.envshake.time: See below. (int)</li>
<li>fall.envshake.freq: See below. (float)</li>
<li>fall.envshake.ampl: See below. (int)</li>
<li>fall.envshake.phase: Returns values set by the fall.envshake.*
parameters in an attacker's hitdef. (float)</li>
</ul>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = GetHitVar(yvel) &lt; -5.5
  Triggers if the hit's specified y velocity is less than -5.5.
</pre>
</div>
<div class="section" id="hitcount">
<h2><a class="toc-backref" href="#id44">HitCount</a></h2>
<p>Returns the number times the player's current attack move has hit one or more opponents. This value is valid only for a single state; after any state change, it resets to 0. To prevent it from resetting to 0, set hitcountpersist in the StateDef (see cns documentation for details). The HitCount and UniqHitCount triggers differ only when the player is hitting more than one opponent. In the case where the player is hitting two opponents with the same attack, HitCount will increase by 1 for every hit, while UniqHitCount increases by 2.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitCount</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitCount &gt; 8
  Triggers when more than 8 hits have been dealt to the
  opponent since the start of the player's attack move.
</pre>
</div>
<div class="section" id="hitdefattr">
<h2><a class="toc-backref" href="#id45">HitDefAttr(*,***)</a></h2>
<p>Checks the attribute parameter of the player's currently-active HitDef.
If the player is not currently attacking, then no parameters will match.
Can be used for simple move-interrupts from weaker to stronger attacks in the CMD file.</p>
<p>Note: <tt class="docutils literal">HitDefAttr != value1, value2</tt> is logically equivalent to
<tt class="docutils literal">!(HitDefAttr = value1, value2)</tt>.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitDefAttr [oper] value1, value2</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=</dd>
<dt>value1</dt>
<dd>A string that has at least one of the letters &quot;S&quot;, &quot;C&quot;
and &quot;A&quot; for standing, crouching and aerial attacks
respectively. For example, &quot;SA&quot; is for standing and
aerial attacks.</dd>
<dt>value2</dt>
<dd><p class="first">A set of 2-character strings, separated by commas.
Each 2-character string must be of the form described:
The first character is either &quot;N&quot; for &quot;normal&quot;, &quot;S&quot; for
&quot;special&quot;, or &quot;H&quot; for &quot;hyper&quot;. The second character must
be either &quot;A&quot; for &quot;attack&quot; (a normal hit attack) or &quot;T&quot;
for &quot;throw&quot;. For example, &quot;NA, ST&quot; is for normal attacks
and special throws.</p>
<p>Assuming the attribute of the player's HitDef is in the
form:</p>
<p><tt class="docutils literal">arg1, arg2</tt></p>
<p>then the trigger condition is determined to be true only
if arg1 is a subset of value1, AND arg2 is a subset of
value2.</p>
<p class="last">See the &quot;attr&quot; parameter of the HitDef controller in
Appendix B for details.</p>
</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitDefAttr = A, HA
  Triggers when the player is in an attack state, where
  the current HitDef has the following attributes:
      1. is an aerial attack
  and 2. is a hyper (super) attack

trigger1 = HitDefAttr = SC, NA, SA
  Triggers when the player is in an attack state, where
  the current HitDef has the following attributes:
      1. is either a standing or a crouching attack
  and 2. is either a normal attack or a special attack
</pre>
</div>
<div class="section" id="hitfall">
<h2><a class="toc-backref" href="#id46">HitFall</a></h2>
<p>If the player is currently in a gethit state, returns the fall flag of the hit. The output of this trigger is undefined if the player is not in a gethit state. For an explanation of the fall flag, see the HitDef documentation.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitFall</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = !HitFall
  Triggers if the hit did not put the player into a fall state.
</pre>
</div>
<div class="section" id="hitover">
<h2><a class="toc-backref" href="#id47">HitOver</a></h2>
<p>If the player is in a gethit state, returns 1 when the hittime has expired, and 0 otherwise. For an explanation of hittime, see the HitDef documentation.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitOver</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitOver = 1
  Triggers when the player’s hittime has expired.
</pre>
</div>
<div class="section" id="hitpausetime">
<h2><a class="toc-backref" href="#id48">HitPauseTime</a></h2>
<p>Returns the time until the player's hitpause expires. The player enters a hitpause when his attack comes in contact with an opponent. The initial hitpause time is equal to the first value of the pausetime parameter in the player's HitDef. If ignorehitpause is not set, this will always return 0.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitPauseTime</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitPauseTime = 0
  Triggers when the player is not paused for a hit.
</pre>
</div>
<div class="section" id="hitshakeover">
<h2><a class="toc-backref" href="#id49">HitShakeOver</a></h2>
<p>If the player is in a gethit state, returns 1 if the hit shake (the period when he is shaking in place) has ended, and 0 otherwise.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitShakeOver</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitShakeOver = 0
  Triggers if the player is still shaking from the hit.
</pre>
</div>
<div class="section" id="hitvel">
<h2><a class="toc-backref" href="#id50">HitVel</a></h2>
<p>Gets the value of the velocity imparted to the player by a hit.
You must specify the component that you want to check, eg.
&quot;HitVel Y&quot; to check the vertical velocity component.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>HitVel [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>A positive HitVel Y means that the player is moving upward on the
screen. A positive HitVel X means that the player is moving
backward. Note that the HitVel X trigger behaves in the opposite
manner to the Vel X trigger.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = HitVel X &gt; 0.5
  True when the player's gethit x-velocity is greater than 0.5
  pixels per tick.
</pre>
</div>
<div class="section" id="id">
<h2><a class="toc-backref" href="#id51">ID</a></h2>
<p>Returns the ID number of the player. The ID number is unique for every player throughout the course of a match. Any helper that is created during this time will also receive its own unique ID number. This trigger may be useful for getting opponents' ID numbers, to be later used with the &quot;playerID&quot; redirection keyword (see exp docs). Do not confuse playerID with targetID.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ID</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = ID
  This sets value to the ID number of the current player.
value = EnemyNear, ID
  This sets value to the ID number of the nearest opponent.
</pre>
</div>
<div class="section" id="ifelse-math">
<h2><a class="toc-backref" href="#id52">IfElse (math)</a></h2>
<p>This trigger takes three arguments. If the first is nonzero, IfElse returns the
value of the second argument. Else, it returns the value of the third argument.
All arguments are evaluated prior to execution of IfElse. In particular, any
side effects caused by evaluation of the arguments (such as variable
assignment, or performing a computation that generates a warning) will occur.
If you wish to avoid these side effects, then use Cond.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>IfElse(exp_cond,exp_true,exp_false)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exp_cond</dt>
<dd>Expression to test.</dd>
<dt>exp_true</dt>
<dd>Expression specifying value to return if exp_cond is nonzero.</dd>
<dt>exp_false</dt>
<dd>Expression specifying value to return if exp_cond is zero.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>Type of exp_true or exp_false, whichever is returned.</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exp_cond evaluates to bottom, or if exp_true or exp_false (whichever is returned) evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = ifelse(var(3),1,2)
  Sets value to 1 if var(3) is not zero, and sets value to 2 if
  var(3) is 0.
</pre>
</div>
<div class="section" id="inguarddist">
<h2><a class="toc-backref" href="#id53">InGuardDist</a></h2>
<p>Returns 1 if the player is within guarding distance of an opponent's physical or projectile attack. The guarding distance is the value of the guard.dist parameter of the opponent's HitDef. Returns 0 if out of guard distance, or the opponent is not attacking.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>InGuardDist</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Example:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="ishelper">
<h2><a class="toc-backref" href="#id54">IsHelper</a></h2>
<p>This trigger takes an optional ID number as an argument. If the ID number is omitted, IsHelper returns 1 if the player is a helper character, and 0 otherwise. If the ID number is included, then IsHelper returns 1 if the player is a helper character with the specified ID number, and 0 otherwise.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>IsHelper</li>
<li>IsHelper(exprn)</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = !IsHelper
  Triggers if the player is not a helper-type character.
2. trigger1 = IsHelper(1234)
  Triggers if the player is a helper character with ID number 1234.
</pre>
</div>
<div class="section" id="ishometeam">
<h2><a class="toc-backref" href="#id55">IsHomeTeam</a></h2>
<p>Returns 1 if the player's team is considered the &quot;home team&quot;. In arcade modes, the computer is always considered the home team. In versus modes, P1's side (left) is the home team.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>IsHomeTeam</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Example:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="leftedge">
<h2><a class="toc-backref" href="#id56">LeftEdge</a></h2>
<p>LeftEdge returns the x position of the left edge of the screen, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>LeftEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;CameraPos X - GameWidth / 2&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos X + CameraPos X &lt; LeftEdge
  Triggers if the player is to the left of the left edge of the screen.
</pre>
</div>
<div class="section" id="life">
<h2><a class="toc-backref" href="#id57">Life</a></h2>
<p>Returns the player's life.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Life</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = life &lt;= 10
  Triggers if the player has 10 or less life points remaining.
</pre>
</div>
<div class="section" id="lifemax">
<h2><a class="toc-backref" href="#id58">LifeMax</a></h2>
<p>Returns the maximum amount of life the player can have. This is normally the value of the &quot;life&quot; parameter in the [Data] group of the player variables, but may be different in situations such as team modes.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>LifeMax</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = life &lt; lifemax / 4
  Triggers if the player has less than 1/4 of his maximum life.
</pre>
</div>
<div class="section" id="ln-math">
<h2><a class="toc-backref" href="#id59">Ln (math)</a></h2>
<p>Returns the natural logarithm of its argument. This produces slightly more accurate results than the otherwise equivalent expression log(e,(argument)).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ln(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the natural logarithm of (float).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn is not
positive.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = ln(time)
  Sets value to the natural logarithm of the player's statetime.
</pre>
</div>
<div class="section" id="log-math">
<h2><a class="toc-backref" href="#id60">Log (math)</a></h2>
<p>Takes two arguments a and b, and returns the base-a logarithm of b.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Log(exp1,exp2)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exp1</dt>
<dd>Expression giving the base of the logarithm. Must be positive.</dd>
<dt>exp2</dt>
<dd>Expression giving the value to take the logarithm of. Must be
positive.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if either of exp1 or exp2 evaluates to bottom, or if
either of exp1 or exp2 is not positive.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value=log(2,64)
  Sets value to the base 2 log of 64, which is 6.0.
</pre>
</div>
<div class="section" id="lose">
<h2><a class="toc-backref" href="#id61">Lose</a></h2>
<p>Returns 1 if the player (or the player's team, in team mode) has lost the round, 0 otherwise. Can be suffixed with &quot;KO&quot; or &quot;Time&quot; to return 1 only when the round has been lost by a KO or by time expiring, respectively.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>Lose</li>
<li>LoseKO</li>
<li>LoseTime</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = Lose
  Triggers if the player (or his team) has lost the round.

2. trigger1 = !LoseKO
  Triggers if the player (or his team) has not lost the round by
  a KO. For example, this will trigger if the player's team has
  not yet lost the round, or if they have lost the round by time
  over.
</pre>
</div>
<div class="section" id="matchno">
<h2><a class="toc-backref" href="#id62">MatchNo</a></h2>
<p>Returns the current match number.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MatchNo</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Details:</dt>
<dd>The current match number is always 1 in versus-type modes. In Arcade and Team Arcade modes, the match number starts at 1 and increments every time a new match starts (does not increment on continue). If you finish the arcade mode and start a new game, the match number reverts to 1.</dd>
<dt>Example:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="matchover">
<h2><a class="toc-backref" href="#id63">MatchOver</a></h2>
<p>Returns 1 if the match has ended. (For example, in the case of a best-of-three match, this will return true when one of the players or teams has won two rounds.)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MatchOver</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>Currently, MatchOver does not return true until the players start
their win poses (state 180). This behavior may be subject to change
in future releases.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = !matchover
  Triggers if the match is not over. For instance, the current round
  may not yet have ended, or it may have ended without deciding the
  match.
</pre>
</div>
<div class="section" id="movecontact">
<h2><a class="toc-backref" href="#id64">MoveContact</a></h2>
<p>This trigger is valid only when the player is in an attack state.
MoveContact gives a non-zero value if P2 has either been hit, or has guarded P1's attack. It gives 0 otherwise. P1 is the player, and P2 is his opponent.
Typically used with the &quot;StateNo&quot; and &quot;Command&quot; triggers for detecting move-interrupts in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MoveContact</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">On attack contact, MoveContact returns 1. After contact, MoveContact's return value will increase by 1 for each game tick that P1 is not paused (P1 gets paused on contact; see pausetime parameter in HitDef controller). The values of MoveGuarded, MoveHit and MoveReversed increment in the same fashion.</p>
<p>Note 1: the values of MoveContact, MoveGuarded, MoveHit and MoveReversed are set simultaneously. For example, if one HitDef in a move hits successfully, MoveHit will return non-zero. If a following HitDef in the same move is guarded, MoveGuarded will return non-zero, and the other three triggers will return 0.</p>
<p class="last">Note 2: the values of the four Move* triggers reset to 0 and stop incrementing after a state transition. See &quot;movehitpersist&quot; parameter for StateDefs (CNS docs) for how to override this behavior.</p>
</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = MoveContact
  True if P1's attack did not miss P2.

trigger1 = MoveContact = 1
  True from the time P1's attack came in contact with P2, until just after P1's pausetime wears off.
</pre>
</div>
<div class="section" id="moveguarded">
<h2><a class="toc-backref" href="#id65">MoveGuarded</a></h2>
<p>This trigger is valid only when the player is in an attack state.
MoveGuarded gives a non-zero value if P2 is guarding, or has guarded, P1's attack. It gives 0 otherwise. P1 is the player, and P2 is his opponent.
Typically used with the &quot;StateNo&quot; and &quot;Command&quot; triggers for detecting move-interrupts in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MoveGuarded</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>See Details section for MoveContact trigger.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = MoveGuarded
  True if P1's attack was guarded by P2.
</pre>
</div>
<div class="section" id="movehit">
<h2><a class="toc-backref" href="#id66">MoveHit</a></h2>
<p>This trigger is valid only when the player is in an attack state.
MoveHit gives a non-zero value if P2 has been hit by P1's attack. It gives 0 otherwise.
Typically used with the &quot;StateNo&quot; and &quot;Command&quot; triggers for detecting move-interrupts in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MoveHit</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>See Details section for MoveContact trigger.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = MoveHit
  True if P1's attack connected successfully with P2.
</pre>
</div>
<div class="section" id="movetype">
<h2><a class="toc-backref" href="#id67">MoveType(*,***)</a></h2>
<p>MoveType gives the player's move-type. Refer to the section
on StateDef in the CNS documentation for more details on MoveType.
Useful for &quot;move interrupts&quot; in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MoveType [oper] move_type</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=   (other operators not valid)</dd>
<dt>move_type (char)</dt>
<dd><dl class="first last docutils">
<dt>A, I, H</dt>
<dd>Attack, Idle and GetHit move-types respectively.</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = movetype != H
  Triggers if the player is not currently in a gethit-type state.
</pre>
</div>
<div class="section" id="movereversed">
<h2><a class="toc-backref" href="#id68">MoveReversed</a></h2>
<p>This trigger is valid only when the player is in an attack state.
MoveReversed gives a non-zero value if P1's attack has been reversed by P2. It gives 0 otherwise.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>MoveReversed</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>See Details section for MoveContact trigger.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = MoveReversed
  True if P1's attack was reversed by P2.
</pre>
</div>
<div class="section" id="name">
<h2><a class="toc-backref" href="#id69">Name(*,***)</a></h2>
<p>Returns the player's name (the internal name specified in the .DEF file, which may not be the same as the displayed name).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Name [oper] &quot;name&quot;</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, != (other operators not valid)</dd>
<dt>&quot;name&quot; (string)</dt>
<dd>Name to compare against. Must be in double quotes.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Name = &quot;Kumquat&quot;
  Returns true if the player is named Kumquat.
</pre>
</div>
<div class="section" id="numenemy">
<h2><a class="toc-backref" href="#id70">NumEnemy</a></h2>
<p>NumEnemy returns the number of opponents that exist. Neutral players and normal helpers are not considered opponents.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>NumEnemy</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = NumEnemy = 2
trigger1 = enemynear(1), name = &quot;Squash&quot;
  Triggers if there are 2 opponents, and the second-closest one is
  named Squash.
</pre>
</div>
<div class="section" id="numexplod">
<h2><a class="toc-backref" href="#id71">NumExplod</a></h2>
<p>This trigger takes an ID number as an optional argument. If the ID number is omitted, NumExplod returns the number of explods owned by the player. If the ID number is included, then NumExplod returns the number of explods with that ID number that are owned by the player. The ID number must be greater than -1. An ID number of -1 or less will give the same behavior as if the ID number is omitted.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>NumExplod</li>
<li>NumExplod(exprn)</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to an ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = NumExplod &gt;= 4
  Triggers if the player currently owns 4 or more explods.
2. trigger1 = NumExplod(1234) &gt;= 4
  Triggers if the player currently owns 4 or more explods with ID
  1234.
</pre>
</div>
<div class="section" id="numhelper">
<h2><a class="toc-backref" href="#id72">NumHelper</a></h2>
<p>This trigger takes an ID number as an optional argument. If the ID number is omitted, then NumHelper returns the total number of helpers currently owned by the player. If the ID number is included, then NumHelper returns the total number of helpers with that ID number owned by the player. The ID number must be greater than 0. If the ID
number is 0 or less, then all helpers are counted.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>NumHelper</li>
<li>NumHelper(exprn)</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to an ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = NumHelper &lt; 2
  Triggers if the player now has less than 2 helpers.
2. trigger1 = NumHelper(1234) &lt; 2
  Triggers if the player now has less than 2 helpers with ID 1234.
</pre>
</div>
<div class="section" id="numpartner">
<h2><a class="toc-backref" href="#id73">NumPartner</a></h2>
<p>NumPartner returns the number of partners that exist. Neutral players and normal helpers are not considered partners.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>NumPartner</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
trigger1 = NumPartner = 1
trigger1 = partner, life &lt; 200
  Triggers if the player has a partner with less than 200 life
</pre>
</div>
<div class="section" id="numproj">
<h2><a class="toc-backref" href="#id74">NumProj</a></h2>
<p>Returns the total number of projectiles currently owned by the player.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>NumProj</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = NumProj = 0
  Triggers if the player has no currently active projectiles.
</pre>
</div>
<div class="section" id="numprojid">
<h2><a class="toc-backref" href="#id75">NumProjID</a></h2>
<p>This trigger takes an ID number as a required argument. It returns the number of projectiles currently owned by the player and having the specified ID number.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>NumProjID(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to an ID number.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>If a negative ID is specified, then the ID defaults to 0. Returns
bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = NumProjID(1234) = 1
  Triggers if there the player currently owns exactly 1 projectile
  with the ID number 1234.
</pre>
</div>
<div class="section" id="numtarget">
<h2><a class="toc-backref" href="#id76">NumTarget</a></h2>
<p>This trigger takes an ID number as an optional argument. If the ID number is omitted, NumTarget returns the current number of targets for the player. If the ID number is included, then NumTarget returns the number of targets for the player which have that target ID number. The ID number must be greater than -1. An ID number of -1 or less will give the same behavior as if the ID number is omitted.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>NumTarget</li>
<li>NumTarget(exprn)</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to an ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = NumExplod &gt;= 4
  Triggers if the player currently owns 4 or more explods.
2. trigger1 = NumExplod(1234) &gt;= 4
  Triggers if the player currently owns 4 or more explods with ID
  1234.
</pre>
</div>
<div class="section" id="p1name">
<h2><a class="toc-backref" href="#id77">P1Name(*,***)</a></h2>
<p>This is an alias for the Name trigger. See &quot;Name&quot;.</p>
</div>
<div class="section" id="p2bodydist">
<h2><a class="toc-backref" href="#id78">P2BodyDist</a></h2>
<p>Returns the distance of P2 from P1, where P1 is the player, and P2 is his opponent. P2BodyDist is useful in the CMD for cases where P1 has an attack that is different when performed close to P2.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>P2BodyDist [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">For comparing the Y-distance, P2BodyDist gives the difference in the
heights of the players' Y-axes. A negative value means that P2 is
above P1.</p>
<p>For comparing the X-distance, P2BodyDist gives the
X-distance of P2's front from P1's front. So, if the
players are standing right next to each other, then
P2BodyDist is 0. Remember that you can set the width of
the player in &quot;front.width&quot;, etc. under [Size] in the
player variables.</p>
<p class="last">See also P2Dist.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = P2BodyDist X &lt; 30
  Triggers if the front of P2 is within 30 pixels of the front of
  P1.
</pre>
</div>
<div class="section" id="p2dist">
<h2><a class="toc-backref" href="#id79">P2Dist</a></h2>
<p>Returns the distance of P2 from P1, where P1 is the player, and P2 is his opponent.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>P2Dist [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">For comparing the Y-distance, P2Dist gives the difference in the
heights of the players' Y-axes. A negative value means that P2 is
above P1.</p>
<p class="last">For comparing the X-distance, P2Dist gives the X-distance
of P2's axis from P1's axis. A positive value indicates P2
is in front of P1.
See also P2BodyDist.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = P2Dist Y &lt;= -12
  True if P2 is at least 12 pixels higher up than P1.
</pre>
</div>
<div class="section" id="p2life">
<h2><a class="toc-backref" href="#id80">P2Life</a></h2>
<p>Same as Life, except that this returns the opponent's life.</p>
</div>
<div class="section" id="p2movetype">
<h2><a class="toc-backref" href="#id81">P2MoveType</a></h2>
<p>Same as MoveType, except that this returns the opponent's movetype.</p>
</div>
<div class="section" id="p2name">
<h2><a class="toc-backref" href="#id82">P2Name(*,***)</a></h2>
<p>Same as P1Name, except that this returns the name of the primary opponent (the opponent in versus mode, or the first opponent in team mode).</p>
<p>If there is no primary opponent, then p2name = &quot;name&quot; returns 0 no
matter what name is specified. Similarly, p2name != &quot;name&quot; will return 1 no matter what name is specified.</p>
</div>
<div class="section" id="p2stateno">
<h2><a class="toc-backref" href="#id83">P2StateNo</a></h2>
<p>Same as StateNo, except that this returns the opponent's state number.</p>
<dl class="docutils">
<dt>Error conditions:</dt>
<dd>Returns bottom if p2 does not exist. (For instance, if the round
has been won.)</dd>
</dl>
</div>
<div class="section" id="p2statetype">
<h2><a class="toc-backref" href="#id84">P2StateType</a></h2>
<p>Same as StateType, except that this returns the opponent's state type.</p>
<dl class="docutils">
<dt>Error conditions:</dt>
<dd>Returns bottom if p2 does not exist. (For instance, if the round
has been won.)</dd>
</dl>
</div>
<div class="section" id="p3name">
<h2><a class="toc-backref" href="#id85">P3Name(*,***)</a></h2>
<p>Same as P1Name, except that this returns the name of the player's teammate, if present.</p>
<p>If there is no teammate, then p3name = &quot;name&quot; returns 0 no matter what name is specified. Similarly, p3name != &quot;name&quot; will return 1 no matter what name is specified.</p>
</div>
<div class="section" id="p4name">
<h2><a class="toc-backref" href="#id86">P4Name(*,***)</a></h2>
<p>Same as P1Name, except that this returns the name of the secondary opponent, if present.</p>
<p>If there is no secondary opponent, then p4name = &quot;name&quot; returns 0 no matter what name is specified. Similarly, p4name != &quot;name&quot; will return 1 no matter what name is specified.</p>
</div>
<div class="section" id="palno">
<h2><a class="toc-backref" href="#id87">PalNo</a></h2>
<p>Returns the palette number of the player (i.e., the color scheme chosen for the character during character select.)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>PalNo</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><div class="first last line-block">
<div class="line">The palette ordering is specified in the character's def file.</div>
<div class="line">If omitted, the default ordering is:</div>
<div class="line"><tt class="docutils literal">A&nbsp; B&nbsp; C&nbsp; X&nbsp; Y&nbsp; Z A2 B2 C2 X2 Y2 Z2</tt></div>
<div class="line"><tt class="docutils literal">1&nbsp; 2&nbsp; 3&nbsp; 4&nbsp; 5&nbsp; 6&nbsp; 7&nbsp; 8&nbsp; 9 10 11 12</tt></div>
</div>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = PalNo = 5
  Returns true if the current palette number is 5.
</pre>
</div>
<div class="section" id="parentdist">
<h2><a class="toc-backref" href="#id88">ParentDist</a></h2>
<p>This trigger is only valid for helper-type characters.
ParentDist returns the distance from the helper to its parent. It works similarly to P2Dist.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ParentDist [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if the player does not have a parent (e.g., if the
parent was destroyed or KO'd).</dd>
<dt>Details:</dt>
<dd>For comparing the Y-distance, ParentDist gives the difference in the
heights of the players' Y-axes. A negative value means that the
parent is above its child.
For comparing the X-distance, ParentDist gives the X-distance
of the parent's axis from the child's axis. A positive value
indicates the parent is in front of the child.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = ParentDist X != 0
  Triggers if the parent is not at the exact same x-position as the
  helper character.
</pre>
</div>
<div class="section" id="pi-math">
<h2><a class="toc-backref" href="#id89">Pi (math)</a></h2>
<p>This trigger returns the numeric value of pi (3.141593...)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>pi</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
</div>
<div class="section" id="pos">
<h2><a class="toc-backref" href="#id90">Pos</a></h2>
<p>Gets the value of the player's position. You must specify the component that you want to check, eg. &quot;Pos Y&quot; to check the Y-position.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Pos [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">For &quot;Pos X&quot;, the value is relative to the center of the
screen (value 0). Negative is left, positive is right.</p>
<p>Due to historical reasons, &quot;Pos X&quot; does not return absolute
position of the player (i.e. relative to the center of the stage),
which may be the more intuitive behavior.
To get the absolute position of the player, use &quot;Pos X + CameraPos X&quot;.</p>
<p class="last">For &quot;Pos Y&quot;, the value is relative to the floor. Negative
is higher up, positive is below the floor.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos Y &gt;= 0
  True when the player is below the floor.
</pre>
</div>
<div class="section" id="power">
<h2><a class="toc-backref" href="#id91">Power</a></h2>
<p>Returns the amount of power the player has.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Power</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = power &gt;= 1000
  True if player has at least 1000 power (level 1).
</pre>
</div>
<div class="section" id="powermax">
<h2><a class="toc-backref" href="#id92">PowerMax</a></h2>
<p>Returns the maximum amount of power the player can have. This is normally 3000 (level 3).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>PowerMax</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = power &lt; powermax / 2
  True if player has less than half his maximum power.
</pre>
</div>
<div class="section" id="playeridexist">
<h2><a class="toc-backref" href="#id93">PlayerIDExist</a></h2>
<p>Returns 1 if a player with the specified ID number exists, 0 otherwise. This ID number is obtained using the &quot;ID&quot; trigger (see ID). Do not confuse PlayerID with TargetID.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>PlayerIDExist(ID_number)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>ID_number</dt>
<dd>An expression that evaluates to the ID number to check for (int)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = PlayerIDExist(var(4))
  Triggers if a player with an ID number equal to the value of
  var(4) exists.
</pre>
</div>
<div class="section" id="prevstateno">
<h2><a class="toc-backref" href="#id94">PrevStateNo</a></h2>
<p>Returns the number of the state that the player was last in. The results of this trigger are not guaranteed to be accurate.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>StateNo</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = PrevStateNo = [200,650]
  Returns true if the player's last state number is between 200 and 650,
  inclusive.
</pre>
</div>
<div class="section" id="projcanceltime">
<h2><a class="toc-backref" href="#id95">ProjCancelTime</a></h2>
<p>This trigger takes an required nonnegative ID number as an argument.  If the player's last projectile to make any kind of contact was cancelled by an opponent's projectile and had the specified ID number, then ProjCancelTime returns the number of ticks since that contact occurred. If the specified ID number is 0, then the projectile ID is not checked. If no projectile meets all the above conditions, then ProjCancelTime returns -1.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ProjCancelTime(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to a nonnegative ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom. If a negative ID is
specified, then the ID defaults to zero.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjCancelTime(1234) = 1
  Triggers if a projectile with ID 1234 was just cancelled by an
  opponent's projectile.
2. trigger1 = ProjCancelTime(0) != -1 &amp;&amp; ProjCancelTime(0) &lt; 15
  Triggers if any of the player's projectiles were cancelled
  within last 15 ticks.
</pre>
</div>
<div class="section" id="projcontact">
<h2><a class="toc-backref" href="#id96">ProjContact(*,***)</a></h2>
<p>This trigger takes an optional ID number as a suffix. If the ID number is omitted, ProjContact returns true if any of the player's projectiles either successfully hit the opponent or were guarded by the opponent. When the ID number is specified, ProjContact returns true only if any of the player's projectiles with the specified ID number either successfully hit the opponent or was guarded.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>ProjContact[ID] = value</li>
<li>ProjContact[ID] = value, [oper] value2</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[ID]</dt>
<dd>Optional ID number.</dd>
<dt>value (boolean)</dt>
<dd>Value to compare against. 0 for false, 1 for true.</dd>
<dt>[oper]</dt>
<dd>=, !=, &lt;, &gt;, &lt;=, &gt;=</dd>
<dt>value2</dt>
<dd>Time value to compare against.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">ProjContact will trigger once for each hit of the projectile, so a
multi-hit projectile can trigger multiple times.</p>
<p>The first form of ProjContact shown above is only valid for one tick
after contact, unlike MoveContact.</p>
<p>For the second form, ProjContact returns true if the projectile made
contact n ticks ago, where n is a nonnegative number satisfying the
relation &quot;n [oper] value2&quot;.</p>
<p class="last">Specifying an ID number of 0 gives the same behavior as if the ID
number is omitted (check all projectiles).</p>
</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjContact1234 = 1
  Triggers if a projectile with ID 1234 just made contact with the
  opponent.
2. trigger1 = ProjContact456 = 0, &lt; 15
  Triggers if no projectile with ID 456 made contact in the last 15
  ticks.
</pre>
</div>
<div class="section" id="projcontacttime">
<h2><a class="toc-backref" href="#id97">ProjContactTime</a></h2>
<p>This trigger takes an required nonnegative ID number as an argument.  If the player's last projectile to make any kind of contact, made contact with the opponent and had the specified ID number, then ProjContactTime returns the number of ticks since that contact occurred. If the specified ID number is 0, then the projectile ID is not checked. If no projectile meets all the above conditions, then ProjContactTime returns -1.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ProjContactTime(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to a nonnegative ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom. If a negative ID is
specified, then the ID defaults to zero.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjContactTime(1234) = 1
  Triggers if a projectile with ID 1234 just made contact with
  the opponent.
2. trigger1 = ProjContactTime(0) != -1 &amp;&amp; ProjContactTime(0) &lt; 15
  Triggers if any of the player's projectiles made successful
  contact with the opponent within the last 15 ticks.
</pre>
</div>
<div class="section" id="projguarded">
<h2><a class="toc-backref" href="#id98">ProjGuarded(*,***)</a></h2>
<p>This trigger takes an optional ID number as a suffix. If the ID number is omitted, ProjGuarded returns true if any of the player's projectiles were guarded by the opponent. When the ID number is specified, ProjGuarded returns true only if one of the player's projectiles with the specified ID number was guarded by the opponent.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>ProjGuarded[ID] = value</li>
<li>ProjGuarded[ID] = value, [oper] value2</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[ID]</dt>
<dd>Optional ID number.</dd>
<dt>value (boolean)</dt>
<dd>Value to compare against. 0 for false, 1 for true.</dd>
<dt>[oper]</dt>
<dd>=, !=, &lt;, &gt;, &lt;=, &gt;=</dd>
<dt>value2</dt>
<dd>Time value to compare against.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">ProjGuarded will trigger once for each hit of the projectile, so a
multi-hit projectile can trigger multiple times.</p>
<p>The first form of ProjGuarded shown above is only valid for one tick
after hit, unlike MoveGuarded.</p>
<p>For the second form, ProjGuarded returns true if the projectile was
guarded n ticks ago, where n is a nonnegative number satisfying the
relation &quot;n [oper] value2&quot;.</p>
<p class="last">Specifying an ID number of 0 gives the same behavior as if the ID
number is omitted (check all projectiles).</p>
</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjGuarded1234 = 1
  Triggers if the opponent just blocked a projectile with ID 1234.
2. trigger1 = ProjGuarded = 1, &lt; 15
  Triggers if the opponent blocked any projectile in the last 15
  ticks.
</pre>
</div>
<div class="section" id="projguardedtime">
<h2><a class="toc-backref" href="#id99">ProjGuardedTime</a></h2>
<p>This trigger takes an required nonnegative ID number as an argument.  If the player's last projectile to make any kind of contact was guarded by the opponent and had the specified ID number, then ProjGuardedTime returns the number of ticks since that contact occurred. If the specified ID number is 0, then the projectile ID is not checked. If no projectile meets all the above conditions, then ProjGuardedTime returns -1.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ProjCancelTime(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to a nonnegative ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom. If a negative ID is
specified, then the ID defaults to zero.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjGuardedTime(1234) = 1
  Triggers if a projectile with ID 1234 was just guarded by the
  opponent.
2. trigger1 = ProjGuardedTime(0) != -1 &amp;&amp; ProjGuardedTime(0) &lt; 15
  Triggers if any of the player's projectiles was guarded by the
  opponent within the last 15 ticks.
</pre>
</div>
<div class="section" id="projhit">
<h2><a class="toc-backref" href="#id100">ProjHit(*,***)</a></h2>
<p>This trigger takes an optional positive ID number as a suffix. If the ID number is omitted, ProjHit returns true if any of the player's projectiles successfully hit the opponent. When the ID number is specified, ProjHit returns true only if one of the player's projectiles with the specified ID number successfully hit the opponent.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd><ol class="first last arabic simple">
<li>ProjHit[ID] = value</li>
<li>ProjHit[ID] = value, [oper] value2</li>
</ol>
</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[ID] (int)</dt>
<dd>Optional ID number.</dd>
<dt>value (boolean)</dt>
<dd>Value to compare against. 0 for false, 1 for true.</dd>
<dt>[oper]</dt>
<dd>=, !=, &lt;, &gt;, &lt;=, &gt;=</dd>
<dt>value2</dt>
<dd>Time value to compare against.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">ProjHit will trigger once for each hit of the projectile, so a
multi-hit projectile can trigger multiple times.</p>
<p>The first form of ProjHit shown above is only valid for one tick
after hit, unlike MoveHit.</p>
<p>For the second form, ProjHit returns true if the projectile hit
n ticks ago, where n is a nonnegative number satisfying the relation
&quot;n [oper] value2&quot;.</p>
<p class="last">Specifying an ID number of 0 gives the same behavior as if the ID
number is omitted (check all projectiles).</p>
</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjHit1234 = 1
  Triggers if a projectile with ID 1234 just made successful
  contact with the opponent.
2. trigger1 = ProjHit1234 = 1, &lt; 15
  Triggers if any of the player's projectiles made successful
  contact with the opponent within the last 15 ticks.
</pre>
</div>
<div class="section" id="projhittime">
<h2><a class="toc-backref" href="#id101">ProjHitTime</a></h2>
<p>This trigger takes an required nonnegative ID number as an argument.  If the player's last projectile to make any kind of contact successfully hit the opponent and had the specified ID number, then ProjHit returns the number of ticks since that contact occurred. If the specified ID number is 0, then the projectile ID is not checked.
If no projectile meets all the above conditions, then ProjHitTime returns -1.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ProjHitTime(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression evaluating to a nonnegative ID number (int).</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom. If a negative ID is
specified, then the ID defaults to zero.</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = ProjHitTime(1234) = 1
  Triggers if a projectile with ID 1234 just made successful
  contact with the opponent.
2. trigger1 = ProjHitTime(0) != -1 &amp;&amp; ProjHitTime(0) &lt; 15
  Triggers if any of the player's projectiles made successful
  contact with the opponent within the last 15 ticks.
</pre>
</div>
<div class="section" id="random">
<h2><a class="toc-backref" href="#id102">Random</a></h2>
<p>Returns a random number between 0 and 999, inclusive.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Random</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Random &lt;= 249
  Triggers if the random number returned is less than or equal to
  249. (This occurs with 25% probability.)
</pre>
</div>
<div class="section" id="rightedge">
<h2><a class="toc-backref" href="#id103">RightEdge</a></h2>
<p>RightEdge returns the x position of the right edge of the screen, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>LeftEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;CameraPos X + GameWidth / 2&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos X + CameraPos X &gt; RightEdge
  Triggers if the player is to the right of the right edge of the screen.
</pre>
</div>
<div class="section" id="rootdist">
<h2><a class="toc-backref" href="#id104">RootDist</a></h2>
<p>This trigger is only valid for helper-type characters.
RootDist returns the distance from the helper to its root. The root is the main player character who owns the helper: for instance, if you select Kumquat to play with, and Kumquat spawns a helper named Kiwi, who in turn spawns a helper named Penguin, then Penguin's root is Kumquat, and Penguin is a descendant of Kumquat. RootDist works similarly to P2Dist.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>RootDist [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if the player has no root.</dd>
<dt>Details:</dt>
<dd><p class="first">For comparing the Y-distance, RootDist gives the difference in the
heights of the players' Y-axes. A negative value means that the
root is above its descendant.</p>
<p class="last">For comparing the X-distance, ParentDist gives the X-distance
of the root's axis from the descendant's axis. A positive value
indicates the root is in front of its descendant.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = RootDist X != 0
  Triggers if the root is not at the exact same x-position as the
  helper character.
</pre>
</div>
<div class="section" id="roundno">
<h2><a class="toc-backref" href="#id105">RoundNo</a></h2>
<p>Returns the current round number.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>RoundNo</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = RoundNo = 3
  Triggers if this is the third round of the match.
</pre>
</div>
<div class="section" id="roundsexisted">
<h2><a class="toc-backref" href="#id106">RoundsExisted</a></h2>
<p>Returns the number of rounds the player has existed for. On the first round, returns 0. This is useful for a Turns mode intro.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>RoundsExisted</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = RoundsExisted = 0
trigger1 = TeamMode = Turns
trigger1 = RoundNo &gt; 0
  Triggers if the player has just entered a Turns mode team match
  after the first round. You can use this example with a
  ChangeState controller to switch to an intro state by
  overriding the Initialize state (state 5900).
</pre>
</div>
<div class="section" id="roundstate">
<h2><a class="toc-backref" href="#id107">RoundState</a></h2>
<p>Returns the current round state number.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>RoundState</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>Return values:
0: Pre-intro  - screen fades in
1: Intro
2: Fight - players do battle
3: Pre-over - just a round is won or lost
4: Over - win poses</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = RoundState = 2
  Triggers if the actual fighting portion of the round is in
  progress.
</pre>
</div>
<div class="section" id="screenpos">
<h2><a class="toc-backref" href="#id108">ScreenPos</a></h2>
<p>Gets the value of the player's position relative to the top-right corner of the screen.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ScreenPos [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><p class="first">For &quot;ScreenPos X&quot;, the value is relative to the left of the
screen (value 0). Negative is left, positive is right.</p>
<p class="last">For &quot;ScreenPos Y&quot;, the value is relative to the top of the screen.
Negative is above the screen, positive is downward.</p>
</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = ScreenPos Y &gt;= 0 &amp;&amp; ScreenPos Y &lt; GameHeight
  True when the player's is in the screen's vertical extent.
</pre>
</div>
<div class="section" id="screenheight">
<h2><a class="toc-backref" href="#id109">ScreenHeight</a></h2>
<p>Returns the height of the screen space in the player's local coordinate space.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ScreenHeight</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>ScreenWidth and ScreenHeight are not affected by the camera zoom factor.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
type = Explod
space = screen
pos = 0, ScreenHeight
...
  Creates an explod in screen-space in the lower-right corner
  of the screen.
</pre>
</div>
<div class="section" id="screenwidth">
<h2><a class="toc-backref" href="#id110">ScreenWidth</a></h2>
<p>Returns the width of the screen space in the player's local coordinate space.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>ScreenWidth</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>ScreenWidth and ScreenHeight are not affected by the camera zoom factor.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
type = Explod
space = screen
pos = ScreenWidth / 2, ScreenHeight / 2
...
  Creates an explod in screen-space in the center of the screen.
</pre>
</div>
<div class="section" id="selfanimexist">
<h2><a class="toc-backref" href="#id111">SelfAnimExist</a></h2>
<p>Like AnimExist, except that this only checks P1's animation data. If P1 has been given P2's animation data by a hit, SelfAnimExist will not check P2's animation data to determine whether or not a given action exists.</p>
</div>
<div class="section" id="sin-math">
<h2><a class="toc-backref" href="#id112">Sin (math)</a></h2>
<p>Computes the sine of the specified argument (in radians.)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>sin(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the sine of. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = sin(pi/2)
  Sets value to the sine of pi/2, which is approximately 1.0
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="stateno">
<h2><a class="toc-backref" href="#id113">StateNo</a></h2>
<p>Returns the player's current state number. Useful for &quot;move interrupts&quot; in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>StateNo</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = stateno = [200,650]
  Returns true if the state number is between 200 and 650,
  inclusive.
</pre>
</div>
<div class="section" id="statetype">
<h2><a class="toc-backref" href="#id114">StateType</a></h2>
<p>StateType gives the player's state-type. Refer to the section
on StateDef in the CNS documentation for more details on StateType.
Useful for &quot;move interrupts&quot; in the CMD file.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>StateType [oper] state_type</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=   (other operators not valid)</dd>
<dt>state_type (char)</dt>
<dd><dl class="first last docutils">
<dt>S, C, A, L</dt>
<dd>Stand, Crouch, Air and Liedown state-types.</dd>
</dl>
</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = StateType != A
  Triggers if the player is not in an air-type state.
</pre>
</div>
<div class="section" id="stagevar">
<h2><a class="toc-backref" href="#id115">StageVar(*,***)</a></h2>
<p>Returns information about the stage.
A limited number of parameters are supported.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>StageVar(param_name) [oper] &quot;string&quot;</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>param_name</dt>
<dd><dl class="first last docutils">
<dt>The name of the stage parameter to check. Valid values are:</dt>
<dd>info.name, info.displayname, info.authorname.</dd>
</dl>
</dd>
<dt>[oper]</dt>
<dd>=, != (other operators not valid)</dd>
<dt>&quot;string&quot; (string)</dt>
<dd>String to compare against. Must be in double quotes.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd><ul class="first last simple">
<li>info.author: Compares the value of the &quot;author&quot; parameter
in the [Info] group. (boolean)</li>
<li>info.displayname: Compares the value of the &quot;displayname&quot; parameter
in the [Info] group. (boolean)</li>
<li>info.name: Compares the value of the &quot;name&quot; parameter
in the [Info] group. (boolean)</li>
</ul>
</dd>
<dt>Versions:</dt>
<dd>1.0 and newer</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = StageVar(info.author) = &quot;Suika&quot;
  Returns true if the stage author is named &quot;Suika&quot;.
</pre>
</div>
<div class="section" id="sysfvar">
<h2><a class="toc-backref" href="#id116">SysFVar</a></h2>
<p>This trigger takes a mandatory variable number as an argument. It returns the value of the player's specified system float variable.
This trigger should NOT be used under normal circumstances. System
variables are reserved for bookkeeping in common1.cns.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>SysFVar(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>An expression evaluating to a variable number. Valid numbers
at this time are 0-4.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn evaluates
to an invalid variable index.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = SysFVar(0) = -1.23
  Triggers if the value of system float variable 0 is -1.23.
</pre>
</div>
<div class="section" id="sysvar">
<h2><a class="toc-backref" href="#id117">SysVar</a></h2>
<p>This trigger takes a mandatory variable number as an argument. It returns the value of the player's specified system int variable.
This trigger is NOT to be used under normal circumstances. System
variables are reserved for bookkeeping in common1.cns.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>SysVar(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>An expression evaluating to a variable number. Valid numbers
at this time are 0-4.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn evaluates
to an invalid variable index.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = SysVar(0) = -34
  Triggers if the value of system variable 0 is -34.
</pre>
</div>
<div class="section" id="tan-math">
<h2><a class="toc-backref" href="#id118">Tan (math)</a></h2>
<p>Computes the tangent of the specified argument (in radians.)</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>tan(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>Expression to compute the tangent of. (float)</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
value = tan(pi/4)
  Sets value to the tangent of pi/4, which is approximately 1.0
  (possibly with some rounding error.)
</pre>
</div>
<div class="section" id="teammode">
<h2><a class="toc-backref" href="#id119">TeamMode(*,***)</a></h2>
<p>TeamMode gives the current mode of play for the player's team.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>TeamMode [oper] mode</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=   (other operators not valid)</dd>
<dt>mode (string)</dt>
<dd><div class="first last line-block">
<div class="line">single - single player</div>
<div class="line">simul  - 2 players simultaneously</div>
<div class="line">turns  - turns battle</div>
</div>
</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>In survival mode, TeamMode = turns on the enemy side.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = TeamMode = Single
  Triggers if the player is playing in single play.
</pre>
</div>
<div class="section" id="teamside">
<h2><a class="toc-backref" href="#id120">TeamSide</a></h2>
<p>Returns the team side the player is on. 1 represents P1 side (left), 2 for P2 side (right).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>TeamSide</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = TeamSide = 2
  Triggers if player is on the P2 side team.
</pre>
</div>
<div class="section" id="tickspersecond">
<h2><a class="toc-backref" href="#id121">TicksPerSecond</a></h2>
<p>Returns the number of ticks per second. Useful for time calculations.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>TicksPerSecond</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Time &gt; 10 * TicksPerSecond
  Triggers after 10 seconds, regardless of game speed.
</pre>
</div>
<div class="section" id="time">
<h2><a class="toc-backref" href="#id122">Time</a></h2>
<p>Returns the state-time of the player (that is, the number of ticks that the player has been in the current state so far).</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Time</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Time = 2
  Triggers when the player's state-time is 2.
</pre>
</div>
<div class="section" id="timemod">
<h2><a class="toc-backref" href="#id123">TimeMod(*,**,***)</a></h2>
<p>Returns the remainder when the state-time of the player is divided by the specified value.</p>
<p>The % operator subsumes the functionality of TimeMod, so it is recommended that you use % instead.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>TimeMod [oper] divisor, value1</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[oper]</dt>
<dd>=, !=, &lt;, &gt;, &lt;=, &gt;=</dd>
<dt>divisor (int)</dt>
<dd>Positive number to use as a divisor.</dd>
<dt>value1 (int)</dt>
<dd>Value to compare remainder against.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if the divisor is 0.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = TimeMod = 4, 3
  Triggers when the state-time is 3, 7, 11, 15, ...
</pre>
</div>
<div class="section" id="topedge">
<h2><a class="toc-backref" href="#id124">TopEdge</a></h2>
<p>TopEdge returns the y position of the top edge of the screen, in absolute stage coordinates.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>TopEdge</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Notes:</dt>
<dd>This trigger is equivalent to the expression &quot;Pos Y - ScreenPos Y&quot;.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Pos Y &gt; TopEdge
  Triggers if the player is below the top edge of the screen.
</pre>
</div>
<div class="section" id="uniqhitcount">
<h2><a class="toc-backref" href="#id125">UniqHitCount</a></h2>
<p>Returns the total number of hits the player's current attack move has done. This value is valid only for a single state; after any state change, it resets to 0. To prevent it from resetting to 0, set hitcountpersist in the StateDef (see cns documentation for details). The HitCount and UniqHitCount triggers differ only when the player is hitting more than one opponent. In the case where the player is hitting two opponents with the same attack, HitCount will increase by 1 for every hit, while UniqHitCount increases by 2.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>UniqHitCount</dd>
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = UniqHitCount = [4,6]
  Triggers when 4, 5 or 6 hits have been dealt since
  the start of the player's attack move.
</pre>
</div>
<div class="section" id="var">
<h2><a class="toc-backref" href="#id126">Var</a></h2>
<p>This trigger takes a mandatory variable number as an argument. It returns the value of the player's specified int variable.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Var(exprn)</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>exprn</dt>
<dd>An expression evaluating to a variable number. Valid numbers
at this time are 0-59.</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>int</dd>
<dt>Error conditions:</dt>
<dd>Returns bottom if exprn evaluates to bottom, or if exprn evaluates
to an invalid variable index.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Var(0) = -34
  Triggers if the value of variable 0 is -34.
</pre>
</div>
<div class="section" id="vel">
<h2><a class="toc-backref" href="#id127">Vel</a></h2>
<p>Gets the value of the player's velocity. You must specify the component that you want to check, eg. &quot;Vel Y&quot; to check the Y-velocity.</p>
<dl class="docutils">
<dt>Format:</dt>
<dd>Vel [component]</dd>
<dt>Arguments:</dt>
<dd><dl class="first last docutils">
<dt>[component]</dt>
<dd>X, Y</dd>
</dl>
</dd>
<dt>Return type:</dt>
<dd>float</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
<dt>Details:</dt>
<dd>For Vel X, a positive value indicates that the player is moving forward. (This behavior is the opposite of HitVel X's behavior.) For Vel Y, a positive value indicates that the player is moving downward.</dd>
</dl>
<p>Example:</p>
<pre class="literal-block">
trigger1 = Vel Y &gt;= 0
  True when the player is not moving upward.
</pre>
</div>
<div class="section" id="win">
<h2><a class="toc-backref" href="#id128">Win</a></h2>
<p>Returns true if the player (or the player's team, in team mode) has won the round, false otherwise. Can be suffixed with &quot;KO&quot;, &quot;Time&quot;, or &quot;Perfect&quot; to return true only when the round has been won by a KO, by time expiring, or with no life lost, respectively.</p>
<p>Format:
1. Win
2. WinKO
3. WinTime
4. WinPerfect</p>
<dl class="docutils">
<dt>Arguments:</dt>
<dd>none</dd>
<dt>Return type:</dt>
<dd>boolean int (1 or 0)</dd>
<dt>Error conditions:</dt>
<dd>none</dd>
</dl>
<p>Examples:</p>
<pre class="literal-block">
1. trigger1 = Win
  Triggers if the player (or his team) has won the round.
2. trigger1 = !WinKO
  Triggers if the player (or his team) has not won the
  round by a KO. For example, this will trigger if the
  player's team has not yet won the round, or if they have
  won the round by time over.
</pre>
</div>
</div>
</div>
</body>
</html>
